fix: avoid dependency comparison crashes#5999
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5999 +/- ##
==========================================
+ Coverage 80.69% 80.72% +0.02%
==========================================
Files 146 146
Lines 17443 17465 +22
==========================================
+ Hits 14076 14098 +22
Misses 3367 3367 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
beckermr
left a comment
There was a problem hiding this comment.
Let's change the style of the control-flow using the suggestions to keep the logic easier to parse.
| if patch.after is None: | ||
| new_deps.pop(dep_index) | ||
| # Update existing package. | ||
| else: |
| # Update existing package. | ||
| else: | ||
| new_deps[new_deps.index(patch.before)] = patch.after | ||
| new_deps[dep_index] = patch.after |
There was a problem hiding this comment.
| new_deps[dep_index] = patch.after | |
| new_deps[dep_index] = patch.after |
|
@alceops PTAL |
|
Thanks, applied the requested control-flow cleanup in Verification on the updated PR head:
I did not claim a local pytest run; this runner is missing project test deps ( |
Summary
_apply_env_dep_comparison()match dependency removals/updates by exact text first, then package tokenValueErrorVerification
python3 -m py_compile conda_forge_tick/update_deps.py tests/test_update_deps.py✅git diff --check✅Fixes #5996